package day06;

import java.util.Random;
import java.util.Scanner;

public class MethodDemo {
    static Scanner sc =new Scanner(System.in);
    static Random rand = new Random(100);
    public static void main(String[] args) {
         say();
         sayHello("世界");
         System.out.println("1");

        sayHi("小明",666);
        int z = sum(1,2);
        System.out.println(z);
        System.out.println("输入数组大小");
        int i=sc.nextInt();
        System.out.println("设置数据范围");
        int g = sc.nextInt();
        int[] arr=Arr(i,g);
        for (int x:arr){
            System.out.println(x);
        }
        say(1);
        say("6");
        say(1.2f);

    }
    public  static void  say(){
        System.out.println("2");
    }
    public  static void  say(int a){
        System.out.println("3");
    }
    public  static void  say(float c){
        System.out.println("4");
    }
    public  static void  say(String d){
        System.out.println("5");
    }
    public  static void sayHello(String a){
        System.out.println(a+"你好");
    }
    public  static void sayHi (String a,int b){
        System.out.println(a+"有"+b+"岁");
    }
    public static int sum (int a,int b){
        return a+b;
    }
    public static  int[] Arr(int i,int g){
        int [] arr = new int [i];
        for (int z=0;z< arr.length;z++){
            arr[z]=rand.nextInt(g);

        }
        return arr;


    }

}
